package cn.wolfcode.trip.base.mapper;

import cn.wolfcode.trip.base.domain.StrategyComment;
import cn.wolfcode.trip.base.query.QueryObject;
import cn.wolfcode.trip.base.query.StrategyCommentCheckGoodQueryObject;
import com.github.pagehelper.PageInfo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface StrategyCommentMapper {
    int deleteByPrimaryKey(Long id);

    int insert(StrategyComment record);

    StrategyComment selectByPrimaryKey(Long id);

    List<StrategyComment> selectAll();

    int updateByPrimaryKey(StrategyComment record);

    List<StrategyComment> selectForList(QueryObject qo);

    void insertRelation(@Param("tagId") Long tagId, @Param("commentId") Long commentId);

    void updateViewCount(@Param("newViewCount") Integer newViewCount, @Param("id") Long id);

    StrategyComment selectCheckThumbup(@Param("commentId") Long commentId, @Param("userId") Long userId);

    void insertThumbupRelation(@Param("commentId") Long commentId, @Param("currentUserId") Long currentUserId);

    void delete1ThumbupRelation(@Param("commentId") Long commentId, @Param("currentUserId") Long currentUserId);

    void updateAddThumbupCount(Long commentId);


    void updateReduceThumbupCount(Long commentId);

    List<StrategyComment> selectStrategyCommentCheckHistory(StrategyCommentCheckGoodQueryObject qo);
}